home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / FLI106C.ZIP;1 / BLQUICK.CPP < prev    next >
Encoding:
C/C++ Source or Header  |  1992-03-12  |  1.2 KB  |  64 lines

  1. //
  2. // The Fusion Library Interface for DOS
  3. // Version 1.06c
  4. // Copyright (C) 1990, 1991, 1992
  5. // Software Dimensions
  6. //
  7. // BlazeClass
  8. //
  9.  
  10. #include "fli.h"
  11.  
  12. #ifdef __BCPLUSPLUS__
  13. #pragma hdrstop
  14. #endif
  15.  
  16. #include <ctype.h>
  17. #include <string.h>
  18.  
  19. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  20. //
  21. // QuickDisplay()
  22. //
  23. // Used with special menu or highlight strings (i.e. ~Open file)
  24. //
  25. //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
  26.  
  27. int BlazeClass::QuickDisplay(int X,int Y,int QuickColor,int NormalColor,
  28.   char *QuickText)
  29. {
  30.   if (!strchr(QuickText,'~'))
  31.   {
  32.     BlazeClass::operator()(X,Y) << NormalColor << QuickText;
  33.     return 0;
  34.   }
  35.  
  36.   int Remember=0;
  37.  
  38.   BlazeClass::operator()(X,Y) << NormalColor;
  39.  
  40.   while (*QuickText)
  41.   {
  42.     if (*QuickText!='~')
  43.       *this << *QuickText++;
  44.     else
  45.     {
  46.       if (*(QuickText+1))
  47.       {
  48.         *this << QuickColor
  49.           << *(QuickText+1)
  50.           << NormalColor;
  51.  
  52.         if (!Remember)
  53.           Remember=*(QuickText+1);
  54.  
  55.         QuickText+=2;
  56.       }
  57.     }
  58.   }
  59.  
  60.   Remember-=((islower(Remember))?32:0);
  61.  
  62.   return Remember;
  63. }
  64.